#ifndef STYLELOADER_H
#define STYLELOADER_H

#include <QPixmap>
#include <QString>
#include <QVector>
#include <QDir>

#include "stylesdialog.h"

struct Style
{
    int uniqId;
    QString name;
    QString img;
};

class StyleLoader
{
public:
    StyleLoader();
    ~StyleLoader();

    bool loadStyles(QMap<int, Style> &styles);
    bool setDir(QString dir);
    QString dir() const { return mCurrentDir; }

private:
    bool processLine(const QString line, Style &style);

    QString mCurrentDir;
    QString mFallbackImg;
    bool mHaveErrors;
};

#endif // STYLELOADER_H
